package com.sbc.convention.constants;

import lombok.AllArgsConstructor;
import lombok.Getter;

/**
 * @description: 通用状态码枚举
 * @author: songbaicheng
 * @create: 2024-02-27 10:58
 **/
@Getter
@AllArgsConstructor
public enum CommonEnum implements IEnum {

    /**
     * 总状态码
     */
    SUCCESS("0000", "成功"),
    ERROR("9999", "错误");

    /**
     * 错误码
     */
    private final String code;
    /**
     * 错误信息
     */
    private final String message;

    @Override
    public String code() {
        return code;
    }

    @Override
    public String message() {
        return message;
    }
}
